package com.iflytek.day28._02_properties;

import java.util.Properties;
import java.util.Set;

public class _01_PropertiesDemo {
  public static void main(String[] args) {
    // 创建集合对象
    // Properties<String, String> prop = new Properties<String, String>(); // 错误
    Properties prop = new Properties();

    // 存储元素
    prop.put("sias001", "佟丽娅");
    prop.put("sias002", "赵丽颖");
    prop.put("sias003", "刘诗诗");

    // 遍历集合
    Set<Object> keySet = prop.keySet();
    for (Object key : keySet) {
      Object value = prop.get(key);
      System.out.println(key + "," + value);
    }
  }
}
